/***********************************************************************************
  * File:			usart.h
  * Version:		V1.0
  * Date:			2021.5.26
  * Description:	uartӦ�ú����ӿ�
***********************************************************************************/
#ifndef __USART_H__
#define	__USART_H__

/* ͷ�ļ� */
#include <rthw.h>
#include "n32g45x.h"
#include "n32g45x_gpio.h"
#include "n32g45x_usart.h"
#include "n32g45x_rcc.h"
#include <stdio.h>

// ����1-USART1
#define LOG_USARTx        USART1
#define LOG_PERIPH        RCC_APB2_PERIPH_USART1
#define LOG_GPIO          GPIOA
#define LOG_PERIPH_GPIO   RCC_APB2_PERIPH_GPIOA
#define LOG_TX_PIN        GPIO_PIN_9
#define LOG_RX_PIN        GPIO_PIN_10


void log_uart_init(void);
void Usart2_Init(unsigned int baud);
void Usart_SendString(USART_Module *USARTx, unsigned char *str, unsigned short len);

#endif /* __USART_H__ */
